package cn.itrip.controller;

import cn.itrip.commons.DtoUtils;
import cn.itrip.dto.Dto;
import cn.itrip.service.ItripAreaDicService;
import cn.itrip.service.ItripHotelService;
import cn.itrip.vo.HotelCityVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Super God Jie
 * @version 1.0  2022-04-14 22:32
 */
@RestController
@RequestMapping("/api/hotel")
public class HotelController {
	@Resource
	private ItripAreaDicService itripAreaDicService;

	@GetMapping("/queryhotcity/{isChina}")
	public Dto queryhotcity(@PathVariable Long isChina){
		List<HotelCityVO> hotelCityVOS = itripAreaDicService.queryHotelCity(isChina);
		return DtoUtils.returnSuccess(hotelCityVOS);
	}
}
